package com.info.zhiduoduo.repository.entity.partner;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bob
 * @since 2020-02-28
 */
@Data
@Accessors(chain = true)
@TableName("zdd_partner_sub")
public class PartnerSub extends Model<PartnerSub> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 合伙人id
     */
    private Integer partnerid;
    /**
     * 二级合伙人id
     */
    @TableField("sub_partnerid")
    private Integer subPartnerid;
    /**
     * 分佣比例
     */
    private BigDecimal rate;
    /**
     * 操作人员id
     */
    private Integer managerid;
    /**
     * 状态 1：正常 2：失效
     */
    private Integer state;
    /**
     * 逻辑删除 0：正常 1：已删除
     */
    @TableLogic
    private Integer deleted;
    private Date createtime;
    private Date updatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
